#include <iostream>
#include "UserInterface.h"

using namespace std;
using namespace Records;

void exec()
{
	Database employeeDB;
	bool done = false;
	while (!done) {
		int selection = displayMenu();
		switch (selection) {
		case 1:
			doHire(employeeDB);
			break;
		case 2:
			doFire(employeeDB);
			break;
		case 3:
			doPromote(employeeDB);
			break;
		case 4:
			employeeDB.displayAll();
			break;
		case 5:
			employeeDB.displayCurrent();
			break;
		case 6:
			employeeDB.displayFormer();
			break;
		case 0:
			done = true;
			break;
		default:
			cerr << "Unknown command." << endl;
		}
	}
}

int main(int argc, char const *argv[])
{
	
	// cout << "Testing the Employee class" << endl;
	// Employee emp;
	// emp.setFirstName("Marni");
	// emp.setLastName("Kleper");
	// emp.setEmployeeNumber(71);
	// emp.setSalary(5000);
	// emp.promote();
	// emp.promote(50);
	// emp.hire();
	// emp.display();

	// Database myDB;
	// Employee& emp1 = myDB.addEmployee("Greg", "Wallis");
	// emp1.fire();
	// Employee& emp2 = myDB.addEmployee("Scott", "Kleper");
	// emp2.setSalary(10000);
	// Employee& emp3 = myDB.addEmployee("Nick", "Solter");
	// emp3.setSalary(10000);
	// emp3.promote();
	// cout << "all employees:" << endl;
	// cout << endl;
	// myDB.displayAll();
	// cout << endl;
	// cout << "current employees:" << endl;
	// cout << endl;
	// myDB.displayCurrent();
	// cout << endl;
	// cout << "former employees:" << endl;
	// cout << endl;
	// myDB.displayFormer();

	exec();

	return 0;
}
